/*
 * EmailLogger
 * Created: Dec 19, 2006 
 * by abargnesi<mailto:abargnesi@aquent.com/>
 */
package com.den4.jynform.alerts;

import java.io.Serializable;

public class EmailLogger implements Logger, Serializable {
    private String host;
    private String user;
    private String pass;
    private String fromAddress;
    private String toAddress;
    
    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }
    
    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public String getFromAddress() {
        return fromAddress;
    }

    public void setFromAddress(String fromAddress) {
        this.fromAddress = fromAddress;
    }

    public String getToAddress() {
        return toAddress;
    }

    public void setToAddress(String toAddress) {
        this.toAddress = toAddress;
    }

    public void log(String subject, String body) {
        //Create email from subject and body and send it off.
//        SimpleMailMessage email = new SimpleMailMessage();
//        email.setFrom(fromAddress);
//        email.setTo(toAddress);
//        email.setSentDate(new Date());
//        email.setSubject(subject);
//        email.setText(body);
    }

    public void logEmails(String[] subjects, String[] bodies) {
        //Create emails from subjects and bodies and send them off.
        for(int i = 0; i < subjects.length; i++) {
//            SimpleMailMessage email = new SimpleMailMessage();
//            email.setFrom(fromAddress);
//            email.setTo(toAddress);
//            email.setSentDate(new Date());
//            email.setSubject(subjects[i]);
//            email.setText(bodies[i]);
        }
    }
}
